@import 'theme';
@import 'functions';
@import 'mixins';

$cx-search-list-border: 1px solid;
$cx-search-list-border-color: 'light' !default;
$cx-search-list-trbl-margin: 0 0 25px 0;

$cx-search-list-image-width: 100% !default;

$cx-search-list-name-trbl-margin: 0 0 3px 0 !default;
$cx-search-list-name-color: 'dark' !default;
$cx-search-list-name-hover-color: 'primary' !default;

$cx-search-list-price-trbl-margin: 0 0 25px 0 !default;

$cx-search-list-price-new-trbl-margin: 0 0 0 5px !default;

$cx-search-list-price-old-color: 'secondary' !default;
$cx-search-list-price-new-color: 'primary' !default;

.cx-product-search-list {
  border-bottom: $cx-search-list-border;
  @include var-color('border-color', $cx-search-list-border-color);
  margin: $cx-search-list-trbl-margin;

  &:last-of-type {
    border-bottom: none;
  }

  &__image__container {
    display: block;
    text-align: center;
  }

  &__image {
    width: $cx-search-list-image-width;
  }

  &__name {
    @include type('5');
    text-align: left;
    display: block;
    margin: $cx-search-list-name-trbl-margin;
    @include var-color('color', $cx-search-list-name-color);
    text-decoration: none;

    &:hover {
      @include var-color('color', $cx-search-list-name-hover-color);
    }
  }

  &__price--container {
    text-align: left;
  }

  &__price {
    @include type('3');
    text-align: left;
    display: inline-block;
    margin: $cx-search-list-price-trbl-margin;

    &--old {
      @include var-color('color', $cx-search-list-price-old-color);
      text-decoration: line-through;
    }

    &--new {
      margin: $cx-search-list-price-new-trbl-margin;
      @include var-color('color', $cx-search-list-price-new-color);
    }
  }
}
